encodeRequest wraps backend failures with request context